using System;

namespace CodeStory.WebApplication
{
	public partial class Error : System.Web.UI.Page
	{
		protected override void OnInit(EventArgs e) {
			Load += new EventHandler(Error_Load);
			base.OnInit(e);
		}

		void Error_Load(object sender, EventArgs e) {
			string url = Request.QueryString["url"];
			Exception ex = Server.GetLastError();
			msgLabel.Text = ex.ToString();
			string script = @"
window.onload = function(){
	window.setTimeout(function(){window.location="""+url+@""";},5000);
}
";
			Page.ClientScript.RegisterClientScriptBlock(GetType(), "refresh", script, true);
		}
	}
}